<?php

use Dcat\Admin\Admin;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;

Admin::routes();

Route::group([
	'prefix' => config('admin.route.prefix'),
	'namespace' => config('admin.route.namespace'),
	'middleware' => config('admin.route.middleware'),
], function (Router $router) {

	$router->get('/', 'HomeController@index');
	$router->get('/cache/flush', 'HomeController@cacheFlush');
    $router->any('orderconfig', 'OrderConfigController@setItems');
	$router->any('config', 'SysconfigController@setItems');
    $router->any('coConfig', 'CoConfigController@setItems');
	$router->resource('sysconfig', 'SysconfigController');
	$router->resource('goods', 'GoodController');
	$router->resource('attachment', 'AttachmentController');
	$router->any('upload', 'AttachmentController@handle');

    $router->resource('coExpress', 'CoExpressController');

    $router->resource('coWeight', 'CoWeightController');
    $router->resource('coDistributionType', 'CoDistributionTypeController');

    $router->resource('coUserDistribution', 'CoUserDistributionController');
    //快递分类
    $router->resource('coCargoType', 'CoCargoTypeController');
    //订单管理
    $router->resource('coOrder', 'CoOrderController');
    //配送员管理
    $router->resource('coDistribution', 'CoDistributionController');
    //提现审核
    $router->resource('coUserMoney', 'CoUserMoneyController');
    Route::any('pay_order', 'CoUserMoneyController@pay_order');
    //广告管理
    $router->resource('coRotation', 'CoRotationController');

    //学校管理
    $router->resource('coSchool', 'CoSchoolController');
    //楼栋管理
    $router->resource('coSchoolBuilding', 'CoSchoolBuildingController');
    //快递点管理
    $router->resource('coSchoolExpress', 'CoSchoolExpressController');
    //楼栋类型管理
    $router->resource('coSchoolName', 'CoSchoolNameController');
    //协议管理
    $router->resource('coAgreement', 'CoAgreementController');
    $router->resource('coComplaint', 'CoComplaintController');
    $router->resource('coUser', 'CoUserController');
    $router->resource('coSchoolTime', 'CoSchoolTimeController');
    $router->resource('coImg', 'CoImgController');


















});
